package de.hpi.generator.model;

//public class DatetimeColumn extends Column {
//	int aBaseYear = 2000;
//	int aYearsRange = 11;
//	String aDateSeparator = ".";
//	String aDateTimeSeparator = " ";
//	String aTimeSeparator = ":";
//
//	public DatetimeColumn(String aName, int aCellSize, String aDataType,
//			DataDistributor aDataDistributor, Table aOwner) {
////		super(aName, aDataType, aDataDistributor, aOwner); 
//	}
//	
//	public String getColumnName() {
//		return "Datetime";
//	}
//	
//	
//	public String convertToString(int aNumber) {
//		int aYear = aBaseYear + aNumber%aYearsRange;
//		aNumber = aNumber/aYearsRange;
//		int aMonth = aNumber%12;
//		if(aMonth<0)aMonth+=12;
//		aNumber = aNumber/12;
//		int aDay =  aNumber%30;
//		if(aDay<0)aDay+=30;
//		aNumber = aNumber/30;
//		int aHour = aNumber%24;
//		if(aHour<0)aHour+=24;
//		aNumber = aNumber/24;
//		int aMinute = aNumber%60;
//		if(aMinute<0)aMinute+=60;
//		aNumber = aNumber/60;
//		int aSecond = aNumber%60;
//		if(aSecond<0)aSecond+=60;
//		Calendar aCalendar = new GregorianCalendar(aYear, aMonth, aDay, aHour, aMinute, aSecond);
//		return printCalendar(aCalendar);
//	}
//	
//	public String convertToDate(int aNumber){
////		int aYear = aBaseYear + aNumber%aYearsRange;
////		aNumber = aNumber/aYearsRange;
////		int aMonth = aNumber%12;
////		if(aMonth<0)aMonth+=12;
////		aNumber = aNumber/12;
////		int aDay =  aNumber%30;
////		if(aDay<0)aDay+=30;
////		aNumber = aNumber/30;
////		int aHour = aNumber%24;
////		if(aHour<0)aHour+=24;
////		aNumber = aNumber/24;
////		int aMinute = aNumber%60;
////		if(aMinute<0)aMinute+=60;
////		aNumber = aNumber/60;
////		int aSecond = aNumber%60;
////		if(aSecond<0)aSecond+=60;
////		aNumber +=  
//		aNumber *= 1000;
//		Date aDate = new Date(aNumber);
////		Calendar aCalendar = new GregorianCalendar();
////		aCalendar.setTime(aDate);
//		DateFormat aDateFormat = new SimpleDateFormat();
//		String result = aDateFormat.format(aDate);
//		
////		String result = aDate.getDay()+aDateSeparator +
////						aDate.getMonth() + aDateSeparator +
////						aDate.getYear() + aDateTimeSeparator +
////						aDate.getHours()+aTimeSeparator +
////						aDate.getMinutes()+aTimeSeparator +
////						aDate.getSeconds();
////		
////		aDate.
//		return result;
//	}
//	
//	 private String printCalendar(Calendar aCalendar )
//	  {
//	   
//	    String result =
//	                        (aCalendar.get(Calendar.DATE)) + aDateSeparator +
//	                        (aCalendar.get(Calendar.MONTH)+1) + aDateSeparator +
//	                        aCalendar.get(Calendar.YEAR) + aDateTimeSeparator +
//	                        aCalendar.get(Calendar.HOUR_OF_DAY) + aTimeSeparator +
//	                        aCalendar.get(Calendar.MINUTE) + aTimeSeparator +
//	                        aCalendar.get(Calendar.SECOND);
//	   
//
//	    return result;
//	  }

//}
